'use strict';

const { rejects } = require("assert");
const { resolve } = require("dns");

exports.main = async (event, context) => {
	var db = uniCloud.database()
	return new Promise((resolve,rejects) => {
		db.collection('TodoList').add(event).then((res) =>{
			resolve(res)
		}).catch((err)=>{
			rejects(err)
		})
	})	
};
